package com.tsll.controller;
import com.tsll.annotation.MyLog;
import com.tsll.service.impl.DepartmentServiceImpl;
import com.tsll.service.impl.StaffServiceImpl;
import com.tsll.vo.EchartsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/echarts")
public class EchartsController {
    @Autowired
    private StaffServiceImpl service;
    @Autowired
    private DepartmentServiceImpl departmentService;
    @RequestMapping("/select")
    public List<EchartsVo> selectAll(){
       return service.selectname();
    }
    /**
     * 统计表的方法
     * 查询并返回所有部门及人员信息
     */
    @MyLog(businessName = "统计信息")
    @RequestMapping("/selectstaff")
    public List<EchartsVo> selectAlls(){

        List<EchartsVo> selectname = departmentService.selectname();
        return selectname;

    }


}
